from flask import Blueprint

api = Blueprint('api', __name__)

from app.api import socket_tcp


api.add_url_rule('/api/configIP', view_func=socket_tcp.ConfigRegisterIpView.as_view('configIP'))
api.add_url_rule('/api/configSN', view_func=socket_tcp.ConfigRegisterSnView.as_view('configSN'))
api.add_url_rule('/api/configHZ', view_func=socket_tcp.ConfigRegisterHzView.as_view('configHZ'))
api.add_url_rule('/api/configDE', view_func=socket_tcp.ConfigRegisterDeView.as_view('configDE'))
api.add_url_rule('/api/configMM', view_func=socket_tcp.ConfigRegisterMView.as_view('configMM'))
api.add_url_rule('/api/startCollect', view_func=socket_tcp.ControlRegisterStartView.as_view('startCollect'))
api.add_url_rule('/api/endCollect', view_func=socket_tcp.ControlRegisterEndView.as_view('endCollect'))
api.add_url_rule('/api/takeZero', view_func=socket_tcp.ControlRegisterZeroView.as_view('takeZero'))
api.add_url_rule('/api/getDevices', view_func=socket_tcp.GetDeviceView.as_view('getDevices'))
api.add_url_rule('/api/getDeviceMM', view_func=socket_tcp.GetDeviceMView.as_view('getDeviceMM'))
api.add_url_rule('/api/getDeviceDE', view_func=socket_tcp.GetDeviceDeView.as_view('getDeviceDE'))
api.add_url_rule('/api/getDeviceHZ', view_func=socket_tcp.GetDeviceHzView.as_view('getDeviceHZ'))
api.add_url_rule('/api/getDeviceUploadData', view_func=socket_tcp.GetDeviceUploadDataView.as_view('getDeviceUploadData'))
api.add_url_rule('/api/exportDeviceUploadData', view_func=socket_tcp.ExportDeviceDataView.as_view('exportDeviceUploadData'))
